//
//  GJNetworkPrefix.m
//  xmgjAppFront
//
//  Created by Zeki on 2020/7/9.
//  Copyright © 2020 guojutech. All rights reserved.
//

#import "GJNetworkPrefix.h"

@implementation GJNetworkPrefix

+ (instancetype)sharedInstance{
  static GJNetworkPrefix *instance = nil;
  static dispatch_once_t onceToken;
  dispatch_once(&onceToken, ^{
    instance = [GJNetworkPrefix new];
    instance.env = GJNetworkPrefixEnvEnterDEV; // 默认测试环境
  });
  return instance;
}

- (void)setEnv:(GJNetworkPrefixEnv)env{
  _env = env;
  switch (_env) {
    case GJNetworkPrefixEnvEnterDEV:
    {
      _networkPrefix = @"http://gateway-dev.cqxmgj.lo:9100/";
    }
      break;
      
    case GJNetworkPrefixEnvEnterTest:
    {
      _networkPrefix = @"https://api-test.guojutech.net/";
    }
      break;
    case GJNetworkPrefixEnvEnterProduct:
    {
      _networkPrefix = @"https://api.guojutech.net/";
    }
      break;
    case GJNetworkPrefixEnvEnterUAT:
    {
      _networkPrefix = @"https://api-uat.guojutech.net/";
    }
      break;
    default:
      break;
  }
}
@end
